package test;
import java.math.BigDecimal;
import java.util.Date;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.parser.Feature;
import handler.Main;
import org.apache.commons.codec.digest.DigestUtils;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import pojo.*;;
import service.FinanceDataService;
import service.Impl.FinanceDataServiceImpl;
import service.Impl.GeneralDataServiceImpl;

/**
 * @Author ：zbzbzzz
 * @Date ：Created in 18:29 2020/1/1
 * @Description：各个表的测试
 * @Modified By：
 * @Version: X.X
 */
public class test{
    private static Logger logger = LoggerFactory.getLogger(Main.class);


    /**
     * 功能描述:普通数据测试方法
     * @param object
	 * @param dataname
	 * @param key
     * @return void
     * @author zbzbzzz
     * @date 2020/1/3 19:38
     */
    public void GeneralTest(Object object,String dataname,String key){
        //指定操作orgid
        String orgid = "3cc088be7a949c312fd1f40f1a1f91cd411e9e18";
        try {
            GeneralDataServiceImpl generalDataService = new GeneralDataServiceImpl();
            //上链
            SaveToBcResult msg = generalDataService.saveToBc(orgid,dataname,key,object);
            logger.info(" saveToBcmsg = " + msg);

            //校验
            //生成模拟来自链上返回的数据
            String  tmpData = JSON.toJSONString(object);
            JSONObject jsonObject = JSONObject.parseObject(tmpData, Feature.OrderedField);
            jsonObject.put("orgid",orgid);
            tmpData = jsonObject.toJSONString();
            Object[] list = jsonObject.keySet().toArray();
            jsonObject.put("fieldorder",list);
            String hash = DigestUtils.sha256Hex(tmpData);
            jsonObject.put("hashcode",hash);
            Object dataObject = JSON.parseObject(jsonObject.toJSONString(), Object.class);

            //开始校验,获取校验结果
            boolean result = generalDataService.validateHash(orgid,dataname,key,dataObject);
            logger.info(" validateHashResult = " + result);
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
    /**
     * 功能描述:财务数据测试方法
     * @param object
	 * @param key
     * @return void
     * @author zbzbzzz
     * @date 2020/1/3 19:37
     */
    public void FinanceTest(Object object,String key){
        //指定操作orgid
        String orgid = "3cc088be7a949c312fd1f40f1a1f91cd411e9e18";
        try {
            FinanceDataService financeDataService = new FinanceDataServiceImpl();
            //上链
            SaveToBcResult msg = financeDataService.saveToBc(orgid,key,object);
            logger.info(" saveToBcmsg = " + msg);

            //校验
            //生成模拟来自链上返回的数据
            String  tmpData = JSON.toJSONString(object);
            JSONObject jsonObject = JSONObject.parseObject(tmpData, Feature.OrderedField);
            jsonObject.put("orgid",orgid);
            tmpData = jsonObject.toJSONString();
            Object[] list = jsonObject.keySet().toArray();
            jsonObject.put("fieldorder",list);
            String hash = DigestUtils.sha256Hex(tmpData);
            jsonObject.put("hashcode",hash);
            Object dataObject = JSON.parseObject(jsonObject.toJSONString(), Object.class);

            //开始校验,获取校验结果
            boolean result = financeDataService.validateHash(orgid,key,dataObject);
            logger.info(" vaildateHashResult = " + result);
        } catch (Exception e) {
            e.printStackTrace();
        }


    }

    @Test
    public void testCoreFirm(){
        String jsonString ="{\n" +
                "id: '2cc18b45ff5011e8a77f00163e103bcf',\n" +
                "name: '百货有限公司',\n" +
                "creditCode: '913S05X85T37630565',\n" +
                "license: '/images/97fb673ddbc9476c97cab2ef2890fcd9.jpg',\n" +
                "qualification: '/images/62d3e709e42e49c5a36631a7d7e8685c.jpg',\n" +
                "address: '观前街245号',\n" +
                "voucherSignFee: 0.00140,\n" +
                "enterpriseLogo: '/images/847337db17f145428618fa069ed40f59.jpg',\n" +
                "enterpriseLegalPerson: '董事长',\n" +
                "enterpriseLegalPersonPhone: '13566660023',\n" +
                "enterpriseLegalPersonIdcard: '330330199112192018',\n" +
                "enterpriseLegalPersonIdcardPhoto: '[\"/images/16cac6ef9ea949ea8dd69519d0628e93.jpg\"]',\n" +
                "certificate: '/images/68dcc34f2b764bbc8ca65f93ef92dede.jpg',\n" +
                "faceVideo: '/images/b2076be4757e4d76a908ed5b7268a39b.mp4',\n" +
                "authPerson: '董事长',\n" +
                "authPersonPhone: '13566660024',\n" +
                "authPersonIdcard: '330330199112192018',\n" +
                "authPersonIdcardPhoto: '[\"/images/8a474d3fde0a4c83b8204de37f28ff10.jpg\"]',\n" +
                "prereviewPic: '',\n" +
                "reviewStatus: '2',\n" +
                "updateTime: '2018-12-14 11:29:05',\n" +
                "updateUser: '3bec1890ff5011e8a77f00163e103bcf',\n" +
                "updateUserName: '董事长',\n" +
                "createTime: '2018-12-14 11:29:05',\n" +
                "createUser: '3bec1890ff5011e8a77f00163e103bcf',\n" +
                "createUserName: '董事长',\n" +
                "reviewRemark: '',\n" +
                "guarantee: '0'\n" +
                "}";
        CoreFirm coreFirm = JSON.parseObject(jsonString, CoreFirm.class);
        GeneralTest(coreFirm,"CoreFirm",coreFirm.getId());
    }


    @Test
    public void testIndustrialChain(){
        String jsonString ="{\n" +
                "\tenterpriseId: 'a3e5752f2b7346b6ac1ededaf064aa2f',\n" +
                "\tparentEnterpriseId: 'a3e5752f2b7346b6ac1ededaf064aa2f',\n" +
                "\tcoreFirmId: 'a3e5752f2b7346b6ac1ededaf064aa2f',\n" +
                "\tsupplierStatus: '5',\n" +
                "\tupdateTime: '2019-11-27 18:20:37',\n" +
                "\tupdateUser: '3f8cb8acff4711e8a77f00163e103bc',\n" +
                "\tupdateUserName: '董事长'\n" +
                "}";
        IndustrialChain industrialChain = JSON.parseObject(jsonString, IndustrialChain.class);
        GeneralTest(industrialChain,"IndustrialChain",industrialChain.getEnterpriseId());
    }


    @Test
    public void testSupplier(){
        String jsonString ="{\n" +
                "\tid: '053626088c18417f8fe24e1f526d6cf2',\n" +
                "\tname: '测试--核心企业',\n" +
                "\tcreditCode: '91330381095168315U',\n" +
                "\tlicense: '/images/97fb673ddbc9476c97cab2ef2890fcd9.jpg',\n" +
                "\tqualification: '/images/62d3e709e42e49c5a36631a7d7e8685c.jpg',\n" +
                "\taddress: '万全轻工基地家具园区万盛路61号',\n" +
                "\tenterpriseLogo: '/images/1f93fa6e60e94969b15164c9baa7c08d.jpg',\n" +
                "\tenterpriseLegalPerson: '董事长',\n" +
                "\tenterpriseLegalPersonPhone: '13566660029',\n" +
                "\tenterpriseLegalPersonIdcard: '330330199112192018',\n" +
                "\tenterpriseLegalPersonIdcardPhoto: '[\"/images/16cac6ef9ea949ea8dd69519d0628e93.jpg\"]',\n" +
                "\tcertificate: '/images/68dcc34f2b764bbc8ca65f93ef92dede.jpg',\n" +
                "\tfaceVideo: '/images/b2076be4757e4d76a908ed5b7268a39b.mp4',\n" +
                "\tauthPerson: '董事长',\n" +
                "\tauthPersonPhone: '13566660030',\n" +
                "\tauthPersonIdcard: '330330199112192018',\n" +
                "\tauthPersonIdcardPhoto: '[\"/images/8a474d3fde0a4c83b8204de37f28ff10.jpg\"]',\n" +
                "\tprereviewPic: '',\n" +
                "\treviewStatus: '2',\n" +
                "\tupdateTime: '2018-12-14 11:44:34',\n" +
                "\tupdateUser: 'd4795f78ff5411e8a77f00163e103bcf',\n" +
                "\tupdateUserName: '董事长',\n" +
                "\tcreateTime: '',\n" +
                "\tcreateUser: 'd4795f78ff5411e8a77f00163e103bcf',\n" +
                "\tcreateUserName: '董事长',\n" +
                "\treviewRemark: '',\n" +
                "\tguarantee: 0\n" +
                "}";
        Supplier supplier = JSON.parseObject(jsonString, Supplier.class);
        GeneralTest(supplier,"Supplier",supplier.getId());
    }


    @Test
    public void testContract(){
        //指定操作org
        String orgid = "3cc088be7a949c312fd1f40f1a1f91cd411e9e18";

        String jsonString = "{\n" +
                "contractId: '0498c185be4a4162aeac6d9f6e8a579b',\n" +
                "supplierId: '0498c185be4a4162aeac6d9f6e8a579b',\n" +
                "parentEnterpriseId: '0498c185be4a4162aeac6d9f6e8a579b',\n" +
                "coreFirmId: '0498c185be4a4162aeac6d9f6e8a579b',\n" +
                "startDate: '2019-01-01 00:00:00',\n" +
                "expiryDate: '2019-12-31 00:00:00',\n" +
                "amount: 10000000.00,\n" +
                "payPeriod: '1',\n" +
                "finalPeriod: '2020-12-25 00:00:00',\n" +
                "status: '3',\n" +
                "reviewTime: '2019-03-22 15:07:18',\n" +
                "reviewUser: '0498c185be4a4162aeac6d9f6e8a579b',\n" +
                "reviewUserName: '董事长',\n" +
                "reviewRemark: '审核通过',\n" +
                "updateTime: '2018-12-20 16:40:15',\n" +
                "updateUser: '69fce545043111e9b1ac525400f666e0',\n" +
                "updateUserName: '董事长',\n" +
                "createTime: '2018-12-20 16:40:15',\n" +
                "createUser: 'd4795f78ff5411e8a77f00163e103bcf',\n" +
                "createUserName: '董事长',\n" +
                "content: '合同内容'\n" +
                "}" ;

        try {
            Contract contract = JSON.parseObject(jsonString, Contract.class);
            GeneralDataServiceImpl generalDataService = new GeneralDataServiceImpl();
            //上链
            SaveToBcResult msg = generalDataService.saveToBc(orgid,"contract",contract.getContractId(),contract);
            logger.info(" saveToBcmsg = " + msg);

            //校验
            String  tmpData = JSON.toJSONString(contract);
            JSONObject jsonObject = JSONObject.parseObject(tmpData, Feature.OrderedField);
            jsonObject.put("orgid",orgid);
            tmpData = jsonObject.toJSONString();
            Object[] list = jsonObject.keySet().toArray();
            jsonObject.put("fieldorder",list);
            String hash = DigestUtils.sha256Hex(tmpData);
            jsonObject.put("hashcode",hash);
            boolean result = generalDataService.validateHash(orgid,"contract",contract.getContractId(),jsonObject.toJSONString());
            logger.info(" vaildateHashResult = " + result);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }


    @Test
    public void testFinancial(){
        String jsonString ="{\n" +
                "\tid: '053626088c18417f8fe24e1f526d6cf2',\n" +
                "\tname: '测试--核心企业',\n" +
                "\tcreditCode: '91330381095168315U',\n" +
                "\tlicense: '/images/97fb673ddbc9476c97cab2ef2890fcd9.jpg',\n" +
                "\tqualification: '/images/62d3e709e42e49c5a36631a7d7e8685c.jpg',\n" +
                "\taddress: '万全轻工基地家具园区万盛路61号',\n" +
                "\tenterpriseLogo: '/images/1f93fa6e60e94969b15164c9baa7c08d.jpg',\n" +
                "\tenterpriseLegalPerson: '董事长',\n" +
                "\tenterpriseLegalPersonPhone: '13566660029',\n" +
                "\tenterpriseLegalPersonIdcard: '330330199112192018',\n" +
                "\tenterpriseLegalPersonIdcardPhoto: '[\"/images/16cac6ef9ea949ea8dd69519d0628e93.jpg\"]',\n" +
                "\tcertificate: '/images/68dcc34f2b764bbc8ca65f93ef92dede.jpg',\n" +
                "\tfaceVideo: '/images/b2076be4757e4d76a908ed5b7268a39b.mp4',\n" +
                "\tauthPerson: '董事长',\n" +
                "\tauthPersonPhone: '13566660030',\n" +
                "\tauthPersonIdcard: '330330199112192018',\n" +
                "\tauthPersonIdcardPhoto: '[\"/images/8a474d3fde0a4c83b8204de37f28ff10.jpg\"]',\n" +
                "\tprereviewPic: '',\n" +
                "\treviewStatus: '2',\n" +
                "\tupdateTime: '2018-12-14 11:44:34',\n" +
                "\tupdateUser: 'd4795f78ff5411e8a77f00163e103bcf',\n" +
                "\tupdateUserName: '董事长',\n" +
                "\tcreateTime: '',\n" +
                "\tcreateUser: 'd4795f78ff5411e8a77f00163e103bcf',\n" +
                "\tcreateUserName: '董事长',\n" +
                "\treviewRemark: ''\n" +
                "}";
        Financial financial = JSON.parseObject(jsonString, Financial.class);
        FinanceTest(financial,financial.getId());
    }

    @Test
    public void testFinanceAssetsDebt(){

        FinanceAssetsDebt financeAssetsDebt = new FinanceAssetsDebt();
        financeAssetsDebt.setId("");
        financeAssetsDebt.setSupplierId("");
        financeAssetsDebt.setFillDate(new Date());
        financeAssetsDebt.setA1(new BigDecimal("0"));
        financeAssetsDebt.setA2(new BigDecimal("0"));
        financeAssetsDebt.setA3(new BigDecimal("0"));
        financeAssetsDebt.setA4(new BigDecimal("0"));
        financeAssetsDebt.setA5(new BigDecimal("0"));
        financeAssetsDebt.setA6(new BigDecimal("0"));
        financeAssetsDebt.setA7(new BigDecimal("0"));
        financeAssetsDebt.setA8(new BigDecimal("0"));
        financeAssetsDebt.setA9(new BigDecimal("0"));
        financeAssetsDebt.setA10(new BigDecimal("0"));
        financeAssetsDebt.setA11(new BigDecimal("0"));
        financeAssetsDebt.setA12(new BigDecimal("0"));
        financeAssetsDebt.setA13(new BigDecimal("0"));
        financeAssetsDebt.setA14(new BigDecimal("0"));
        financeAssetsDebt.setA15(new BigDecimal("0"));
        financeAssetsDebt.setA16(new BigDecimal("0"));
        financeAssetsDebt.setA17(new BigDecimal("0"));
        financeAssetsDebt.setA18(new BigDecimal("0"));
        financeAssetsDebt.setA19(new BigDecimal("0"));
        financeAssetsDebt.setA20(new BigDecimal("0"));
        financeAssetsDebt.setA21(new BigDecimal("0"));
        financeAssetsDebt.setA22(new BigDecimal("0"));
        financeAssetsDebt.setA23(new BigDecimal("0"));
        financeAssetsDebt.setA24(new BigDecimal("0"));
        financeAssetsDebt.setA25(new BigDecimal("0"));
        financeAssetsDebt.setA26(new BigDecimal("0"));
        financeAssetsDebt.setA27(new BigDecimal("0"));
        financeAssetsDebt.setA28(new BigDecimal("0"));
        financeAssetsDebt.setA29(new BigDecimal("0"));
        financeAssetsDebt.setA30(new BigDecimal("0"));
        financeAssetsDebt.setA51(new BigDecimal("0"));
        financeAssetsDebt.setA52(new BigDecimal("0"));
        financeAssetsDebt.setA53(new BigDecimal("0"));
        financeAssetsDebt.setA54(new BigDecimal("0"));
        financeAssetsDebt.setA55(new BigDecimal("0"));
        financeAssetsDebt.setA56(new BigDecimal("0"));
        financeAssetsDebt.setA57(new BigDecimal("0"));
        financeAssetsDebt.setA58(new BigDecimal("0"));
        financeAssetsDebt.setA59(new BigDecimal("0"));
        financeAssetsDebt.setA60(new BigDecimal("0"));
        financeAssetsDebt.setA61(new BigDecimal("0"));
        financeAssetsDebt.setA62(new BigDecimal("0"));
        financeAssetsDebt.setA63(new BigDecimal("0"));
        financeAssetsDebt.setA64(new BigDecimal("0"));
        financeAssetsDebt.setA65(new BigDecimal("0"));
        financeAssetsDebt.setA66(new BigDecimal("0"));
        financeAssetsDebt.setA67(new BigDecimal("0"));
        financeAssetsDebt.setA68(new BigDecimal("0"));
        financeAssetsDebt.setA69(new BigDecimal("0"));
        financeAssetsDebt.setA70(new BigDecimal("0"));
        financeAssetsDebt.setA71(new BigDecimal("0"));
        financeAssetsDebt.setA72(new BigDecimal("0"));
        financeAssetsDebt.setA73(new BigDecimal("0"));
        financeAssetsDebt.setA74(new BigDecimal("0"));
        financeAssetsDebt.setA75(new BigDecimal("0"));
        financeAssetsDebt.setA76(new BigDecimal("0"));
        financeAssetsDebt.setA77(new BigDecimal("0"));
        financeAssetsDebt.setUpdateTime(new Date());
        financeAssetsDebt.setUpdateUser("");
        financeAssetsDebt.setUpdateUserName("");
        financeAssetsDebt.setCreateTime(new Date());
        financeAssetsDebt.setCreateUser("");
        financeAssetsDebt.setCreateUserName("");

        FinanceTest(financeAssetsDebt,financeAssetsDebt.getId());
    }

    @Test
    public void testFinanceFlow(){

        FinanceFlow financeFlow = new FinanceFlow();
        financeFlow.setId("");
        financeFlow.setSupplierId("");
        financeFlow.setFillDate(new Date());
        financeFlow.setA1(new BigDecimal("0"));
        financeFlow.setA2(new BigDecimal("0"));
        financeFlow.setA3(new BigDecimal("0"));
        financeFlow.setA4(new BigDecimal("0"));
        financeFlow.setA5(new BigDecimal("0"));
        financeFlow.setA6(new BigDecimal("0"));
        financeFlow.setA7(new BigDecimal("0"));
        financeFlow.setA8(new BigDecimal("0"));
        financeFlow.setA9(new BigDecimal("0"));
        financeFlow.setA10(new BigDecimal("0"));
        financeFlow.setA11(new BigDecimal("0"));
        financeFlow.setA12(new BigDecimal("0"));
        financeFlow.setA13(new BigDecimal("0"));
        financeFlow.setA15(new BigDecimal("0"));
        financeFlow.setA16(new BigDecimal("0"));
        financeFlow.setA18(new BigDecimal("0"));
        financeFlow.setA19(new BigDecimal("0"));
        financeFlow.setA20(new BigDecimal("0"));
        financeFlow.setA21(new BigDecimal("0"));
        financeFlow.setA22(new BigDecimal("0"));
        financeFlow.setA23(new BigDecimal("0"));
        financeFlow.setA24(new BigDecimal("0"));
        financeFlow.setA26(new BigDecimal("0"));
        financeFlow.setA27(new BigDecimal("0"));
        financeFlow.setA28(new BigDecimal("0"));
        financeFlow.setA51(new BigDecimal("0"));
        financeFlow.setA52(new BigDecimal("0"));
        financeFlow.setA53(new BigDecimal("0"));
        financeFlow.setA54(new BigDecimal("0"));
        financeFlow.setA55(new BigDecimal("0"));
        financeFlow.setA56(new BigDecimal("0"));
        financeFlow.setA57(new BigDecimal("0"));
        financeFlow.setA58(new BigDecimal("0"));
        financeFlow.setA59(new BigDecimal("0"));
        financeFlow.setA60(new BigDecimal("0"));
        financeFlow.setA61(new BigDecimal("0"));
        financeFlow.setA62(new BigDecimal("0"));
        financeFlow.setA63(new BigDecimal("0"));
        financeFlow.setA65(new BigDecimal("0"));
        financeFlow.setA66(new BigDecimal("0"));
        financeFlow.setA67(new BigDecimal("0"));
        financeFlow.setA68(new BigDecimal("0"));
        financeFlow.setA69(new BigDecimal("0"));
        financeFlow.setA72(new BigDecimal("0"));
        financeFlow.setA73(new BigDecimal("0"));
        financeFlow.setA74(new BigDecimal("0"));
        financeFlow.setA75(new BigDecimal("0"));
        financeFlow.setA77A1(new BigDecimal("0"));
        financeFlow.setA77A2(new BigDecimal("0"));
        financeFlow.setA77A3(new BigDecimal("0"));
        financeFlow.setA77A5(new BigDecimal("0"));
        financeFlow.setA77A6(new BigDecimal("0"));
        financeFlow.setA77A7(new BigDecimal("0"));
        financeFlow.setA77A8(new BigDecimal("0"));
        financeFlow.setA77A10(new BigDecimal("0"));
        financeFlow.setA77A11(new BigDecimal("0"));
        financeFlow.setA77A12(new BigDecimal("0"));
        financeFlow.setA77A13(new BigDecimal("0"));
        financeFlow.setA77A15(new BigDecimal("0"));
        financeFlow.setUpdateTime(new Date());
        financeFlow.setUpdateUser("");
        financeFlow.setUpdateUserName("");
        financeFlow.setCreateTime(new Date());
        financeFlow.setCreateUser("");
        financeFlow.setCreateUserName("");

        FinanceTest(financeFlow,financeFlow.getId());
    }

    @Test
    public void testFinanceProfits(){

        FinanceProfits financeProfits = new FinanceProfits();
        financeProfits.setId("");
        financeProfits.setSupplierId("");
        financeProfits.setFillDate(new Date());
        financeProfits.setA1(new BigDecimal("0"));
        financeProfits.setA2(new BigDecimal("0"));
        financeProfits.setA3(new BigDecimal("0"));
        financeProfits.setA4(new BigDecimal("0"));
        financeProfits.setA5(new BigDecimal("0"));
        financeProfits.setA6(new BigDecimal("0"));
        financeProfits.setA7(new BigDecimal("0"));
        financeProfits.setA8(new BigDecimal("0"));
        financeProfits.setA9(new BigDecimal("0"));
        financeProfits.setA10(new BigDecimal("0"));
        financeProfits.setA11(new BigDecimal("0"));
        financeProfits.setA12(new BigDecimal("0"));
        financeProfits.setA13(new BigDecimal("0"));
        financeProfits.setA14(new BigDecimal("0"));
        financeProfits.setA15(new BigDecimal("0"));
        financeProfits.setA16(new BigDecimal("0"));
        financeProfits.setUpdateTime(new Date());
        financeProfits.setUpdateUser("");
        financeProfits.setUpdateUserName("");
        financeProfits.setCreateTime(new Date());
        financeProfits.setCreateUser("");
        financeProfits.setCreateUserName("");

        FinanceTest(financeProfits,financeProfits.getId());
    }

    @Test
    public void testFinanceSimple(){

        FinanceSimple financeSimple = new FinanceSimple();
        financeSimple.setId("");
        financeSimple.setSupplierId("");
        financeSimple.setFillDate(new Date());
        financeSimple.setA1("");
        financeSimple.setB1(new BigDecimal("0"));
        financeSimple.setC1("");
        financeSimple.setD1("");
        financeSimple.setA2("");
        financeSimple.setB2(new BigDecimal("0"));
        financeSimple.setC2("");
        financeSimple.setD2("");
        financeSimple.setA3("");
        financeSimple.setB3(new BigDecimal("0"));
        financeSimple.setC3("");
        financeSimple.setD3("");
        financeSimple.setA4("");
        financeSimple.setB4(new BigDecimal("0"));
        financeSimple.setC4("");
        financeSimple.setD4("");
        financeSimple.setA5("");
        financeSimple.setB5(new BigDecimal("0"));
        financeSimple.setC5("");
        financeSimple.setD5("");
        financeSimple.setA6("");
        financeSimple.setB6(new BigDecimal("0"));
        financeSimple.setC6("");
        financeSimple.setD6("");
        financeSimple.setA7("");
        financeSimple.setB7(new BigDecimal("0"));
        financeSimple.setC7("");
        financeSimple.setD7("");
        financeSimple.setA8("");
        financeSimple.setB8(new BigDecimal("0"));
        financeSimple.setC8("");
        financeSimple.setD8("");
        financeSimple.setA9("");
        financeSimple.setB9(new BigDecimal("0"));
        financeSimple.setC9("");
        financeSimple.setD9("");
        financeSimple.setA10("");
        financeSimple.setB10(new BigDecimal("0"));
        financeSimple.setC10("");
        financeSimple.setD10("");
        financeSimple.setA11("");
        financeSimple.setB11(new BigDecimal("0"));
        financeSimple.setC11("");
        financeSimple.setD11("");
        financeSimple.setA12("");
        financeSimple.setB12(new BigDecimal("0"));
        financeSimple.setC12("");
        financeSimple.setD12("");
        financeSimple.setA13("");
        financeSimple.setB13(new BigDecimal("0"));
        financeSimple.setC13("");
        financeSimple.setD13("");
        financeSimple.setA14("");
        financeSimple.setB14(new BigDecimal("0"));
        financeSimple.setC41("");
        financeSimple.setD14("");
        financeSimple.setA15("");
        financeSimple.setB15(new BigDecimal("0"));
        financeSimple.setC15("");
        financeSimple.setD15("");
        financeSimple.setA16("");
        financeSimple.setB16(new BigDecimal("0"));
        financeSimple.setD16("");
        financeSimple.setA17("");
        financeSimple.setB17(new BigDecimal("0"));
        financeSimple.setC17("");
        financeSimple.setD17("");
        financeSimple.setA18("");
        financeSimple.setB18(new BigDecimal("0"));
        financeSimple.setC18("");
        financeSimple.setD18("");
        financeSimple.setA19("");
        financeSimple.setB19(new BigDecimal("0"));
        financeSimple.setC19("");
        financeSimple.setD19("");
        financeSimple.setA20("");
        financeSimple.setB20(new BigDecimal("0"));
        financeSimple.setC20("");
        financeSimple.setD20("");
        financeSimple.setA21("");
        financeSimple.setB21(new BigDecimal("0"));
        financeSimple.setC21("");
        financeSimple.setD21("");
        financeSimple.setA22("");
        financeSimple.setB22(new BigDecimal("0"));
        financeSimple.setC22("");
        financeSimple.setD22("");
        financeSimple.setA23("");
        financeSimple.setB23(new BigDecimal("0"));
        financeSimple.setC23("");
        financeSimple.setD23("");
        financeSimple.setA24("");
        financeSimple.setB24(new BigDecimal("0"));
        financeSimple.setC24("");
        financeSimple.setD24("");
        financeSimple.setA25("");
        financeSimple.setB25(new BigDecimal("0"));
        financeSimple.setC25("");
        financeSimple.setD25("");
        financeSimple.setA26("");
        financeSimple.setB26(new BigDecimal("0"));
        financeSimple.setC26("");
        financeSimple.setD26("");
        financeSimple.setA27("");
        financeSimple.setB27(new BigDecimal("0"));
        financeSimple.setC27("");
        financeSimple.setD27("");
        financeSimple.setA28("");
        financeSimple.setB28(new BigDecimal("0"));
        financeSimple.setC28("");
        financeSimple.setD28("");
        financeSimple.setA29("");
        financeSimple.setB29(new BigDecimal("0"));
        financeSimple.setC29("");
        financeSimple.setD29("");
        financeSimple.setA30("");
        financeSimple.setB30(new BigDecimal("0"));
        financeSimple.setC30("");
        financeSimple.setD30("");
        financeSimple.setA31("");
        financeSimple.setB31(new BigDecimal("0"));
        financeSimple.setC31("");
        financeSimple.setD31("");
        financeSimple.setA32("");
        financeSimple.setB32(new BigDecimal("0"));
        financeSimple.setC32("");
        financeSimple.setD32("");
        financeSimple.setA33("");
        financeSimple.setB33(new BigDecimal("0"));
        financeSimple.setC33("");
        financeSimple.setD33("");
        financeSimple.setA34("");
        financeSimple.setB34(new BigDecimal("0"));
        financeSimple.setC34("");
        financeSimple.setD34("");
        financeSimple.setUpdateTime(new Date());
        financeSimple.setUpdateUser("");
        financeSimple.setUpdateUserName("");
        financeSimple.setCreateTime(new Date());
        financeSimple.setCreateUser("");
        financeSimple.setCreateUserName("");

        FinanceTest(financeSimple,financeSimple.getId());
    }
}
